Skip to main content
Version: DAI 6.5

Run a Model Method

To run a model, you must provide an Authorization header containing access token in the and also a Content-Type header with the value application/x-www-form-urlencoded.

The run endpoint accepts a POST request with parameters in the body of the request to control how the run is executed. The only required fields are the model name and your group name, which is assigned at account creation and defaults to your email address. If you run with only these two parameters, the model runs without connecting to any Eggplant Functional scripts and only generates a path through the model.

If you want to connect to an Eggplant Functional suite, you must use the agent to establish that connection. This allows the Eggplant AI engine to connect to your Eggplant Functional scripts and to execute them. Use the alias you provided in the agent as the agentName parameter in your REST API run request, and enter the path to your Eggplant Functional suite in the suiteLocation parameter. These two parameters are required to connect to Eggplant Functional. Other options allow you to modify things like the number of iterations, logfile name, log directory, seed number, maximum number of actions, and replay flag. The directedTest parameter can be used to run specific test cases.

Method

POST -> http://localhost:8000/api/run

Headers

NameValue
Authorizationbearer <access_token>
Content-Typeapplication/x-www-form-urlencoded

Body Parameters

NameTypeRequiredDefault Value
agentNameTextNo
binsIntegerNo100
coverdbTextNottdb
covertargetIntegerNo1
directedTestTextNo
executetrue/falseNoTrue
groupTextYes
iterationstrue/falseNo1
logdirTextNologs
logfileTextNomodelname_seed_date.log
maxActionsIntegerNo10000
modelNameTextYes
onerrorText (cleancontinueimmediate
pathTextNo
replayIntegerNo
seedIntegerNoRandom (1-999999)
suiteLocationTextNo
verbosityTextNo0x6b00

Possible Responses

StatusStatus TextDescription
200OK
400Bad requestThe required parameters were not sent
401UnauthorizedThe access token was not valid
403ForbiddenNot enough available concurrent user licenses
403ForbiddenThe current user doesn’t have access to the model requested

Response Body JSON

Typical response:

{
"processid": 605546960,
"id": "6632c840-c731-4535-9f3a-890e61f85b04",
"iterations": "1",
"agent": "DAI-Testing"
}
NameTypeDescription
processidIntegerThe ID of the running process.
idText3600
iterationsIntegerbearer
agentTextbearer